package com.shan;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class OperatorDemo1 {
    /*

        1.基本赋值运算符

                =：将等号右侧的数据，赋值给左边的变量

                int num = 10 ;

        2.扩展运算符,内部自带强转效果

                +=：将符号左右两边的数据，做加法运算，再将结果赋值给左边
                -=
                *=
                /=
                %=
 */
    public static void main(String[] args) {
        int num = 10;
        num += 20;      //num = num + 20
        System.out.println(num);

        short s =1;
        s +=1;          //s =(short)(s+1);
        System.out.println(s);

        double a= 12.4;
        int b = 10;
        b +=a;

        System.out.println(b);
    }
}
